package cn.wang.common.vo;

import cn.wang.common.enums.ExceptionBaseEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ExceptionResult {
    private Integer code;
    private String message;
    private Long timestamp;

    public  ExceptionResult(ExceptionBaseEnum em){
        this.code= em.getCode();
        this.message = em.getMessage();
        timestamp = System.currentTimeMillis();
    }
}
